#pragma once

enum VALTYPE {tBOOLEAN, tINTEGER, tFLOATING, tVECTOR3, tPOINTER};
class Object;

struct value
{
	VALTYPE type;

	union
	{
		bool b_value;
		int u_value;
		float f_value;
		float v_value[3];
		void * p_value;
	};

	value(bool v){b_value = v; type = tBOOLEAN;}
	value(int v){u_value = v; type = tINTEGER;}
	value(float v){f_value = v; type = tFLOATING;}
	value(void * v){p_value = v; type = tPOINTER;}
	value(float * v){v_value[0] = v[0];v_value[1] = v[1];v_value[2] = v[2]; type = tVECTOR3;}
	// and finally
	value(){b_value = false; type = tBOOLEAN;}
	static value zero(void){return value(0);} // TERRA-BAD

	bool operator==(value &rhs);
};